﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmTipoDocumentoConsultaGrid.aspx.cs" Inherits="frmTipoDocumentoConsultaGrid" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">



    <p><h1>Consultas Tipo Documento</h1>
        &nbsp;</p>
    <p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="idTipoDocumento" DataSourceID="SqlDataSource1" 
        EmptyDataText="No hay registros de datos para mostrar." AllowPaging="True" 
            AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                EditImageUrl="~/Img/editar-lapiz-icono-8420-96.png" HeaderText="Acción" />
            <asp:BoundField DataField="idTipoDocumento" HeaderText="Codigo" 
                ReadOnly="True" SortExpression="idTipoDocumento" />
            <asp:BoundField DataField="descripcionTipoDocumento" 
                HeaderText="Descripción" 
                SortExpression="descripcionTipoDocumento" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BD_SAFAConnectionString1 %>" 
        DeleteCommand="DELETE FROM [T_TipoDoc] WHERE [idTipoDocumento] = @idTipoDocumento" 
        InsertCommand="INSERT INTO [T_TipoDoc] ([descripcionTipoDocumento]) VALUES (@descripcionTipoDocumento)" 
        SelectCommand="SELECT [idTipoDocumento], [descripcionTipoDocumento] FROM [T_TipoDoc]" 
        
            UpdateCommand="UPDATE [T_TipoDoc] SET [descripcionTipoDocumento] = @descripcionTipoDocumento WHERE [idTipoDocumento] = @idTipoDocumento">
        <DeleteParameters>
            <asp:Parameter Name="idTipoDocumento" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="descripcionTipoDocumento" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="descripcionTipoDocumento" Type="String" />
            <asp:Parameter Name="idTipoDocumento" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <br />
</p>



</asp:Content>

